'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.index);
  router.post('/api/login', controller.home.login);  //登录
  router.get('/api/AbulkList', controller.home.Abulk);  //团购列表渲染
  router.get('/api/LiveList', controller.home.Live);  //直播列表渲染
  router.post('/api/liveState', controller.home.liveState);  //直播状态筛选
  router.post('/api/liveCheck', controller.home.liveCheck);  //直播搜索
  router.get('/api/housingList', controller.home.housingList); //房源管理渲染
  router.post('/api/housingAdd', controller.home.housingAdd);  //房源管理数据添加
  router.post('/api/housingDel', controller.home.housingDel);  //房源管理数据删除
  router.post('/api/housingEdit', controller.home.housingEdit);  //房源管理数据修改
  router.post('/api/abulkState', controller.home.abulkState);  //团购管理数据筛选
  router.post('/api/abulkCheck', controller.home.abulkCheck);  //团购管理数据查询
  router.post("/api/getCitys",controller.home.getCity)
};
